﻿package mortal.game.scene3D.player
{
    import baseEngine.basic.*;
    import frEngine.core.*;
    import frEngine.pools.*;
    import frEngine.render.layer.*;
    import mortal.game.scene3D.model.player.*;

    public class WizardActionPlayer extends ActionPlayer
    {
        public var extendPlayer:ActionPlayer;

        public function WizardActionPlayer(param1:int = 2)
        {
            super(param1);
            return;
        }// end function

        public function loadExtend(param1:String, param2:String, param3:String, param4:RenderList = null) : void
        {
            if (!this.extendPlayer)
            {
                this.extendPlayer = FrObjectPool.getObject(ActionPlayer, this);
                this.extendPlayer.setLayer(Layer3DManager.AlphaLayer0, false);
                this.extendPlayer.material.materialParams.depthWrite = false;
            }
            this.extendPlayer.load(param1, param2, param3, param4, 0, EBlendType.BLEND_ALPHA0);
            this.addChild(this.extendPlayer);
            return;
        }// end function

        override public function load(param1:String, param2:String, param3:String, param4:RenderList = null, param5:Number = 0.5, param6:int = 0) : void
        {
            super.load(param1, param2, param3, param4, param5, EBlendType.BLEND_ALPHA0);
            return;
        }// end function

        override public function set alpha(param1:Number) : void
        {
            super.alpha = param1;
            if (this.extendPlayer)
            {
                this.extendPlayer.alpha = param1;
            }
            return;
        }// end function

        public function clearExtend() : void
        {
            if (this.extendPlayer)
            {
                this.extendPlayer.dispose();
                this.extendPlayer = null;
            }
            return;
        }// end function

        override public function changeAction(param1:String) : void
        {
            super.changeAction(param1);
            if (this.extendPlayer)
            {
                this.extendPlayer.changeAction(param1);
            }
            this.timerContorler.gotoFrame(0, 0);
            return;
        }// end function

        override public function play(param1:int = 0) : void
        {
            super.play(param1);
            if (this.extendPlayer)
            {
                this.extendPlayer.play(param1);
            }
            return;
        }// end function

        override public function dispose(param1:Boolean = true) : void
        {
            super.dispose(param1);
            if (this.extendPlayer)
            {
                this.extendPlayer.dispose(param1);
                this.extendPlayer = null;
            }
            return;
        }// end function

    }
}
